#!/bin/sh

##mainfest: zsp
#date 2019/06/20
#version v1
#/etc/host配置集群ip,已经建立了ssh私钥

 k8sNode=$(cat /etc/hosts|grep k8s|awk '{print $2}')
 complete -W "$k8sNode" k8ssh


function k8ssh(){

case $1 in

"-h")
   echo "usage:
         k8ssh Host"

   echo "Host list:" 
   echo "----------"
   cat /etc/hosts|grep "k8s"
   echo "----------"
;;

*)
     ssh -p30122 root@$1
esac

}
